# ---------- DH allometric
filedata <- "chp16/greenash.txt"
species.name <- "Green ash"
# Input file is in two columns, H and DBH , with labels in the header
# listed in ascending order of DBH. Maximum H and DBH on the second row
D.Hmax <- scan(filedata, skip=1, nlines=1)
D.H <- read.table(filedata, skip=2); names(D.H) <- c("D","H")
d.h <- D.H.est(D.H,D.Hmax,species.name)
Dmax <-100; D <- seq(0,Dmax,0.1)
G <- c(600,1000)
param.H <- c(20, -0.02,0.6); param.l <- c(0.16,0.8,2)
D0 <- 5; t <- seq(0,300)
rates.var <- dD.dt.analysis(D,G,Dmax,param.H,param.l,D0,t)
nsp <- 2; splab <- c("Intolerant","Tolerant")
FE <- list(parab1,parab1,parab1,parab1)
Eopt <- c(1,1,1,1)
param<- list(c(3,2,1.5,1.1), rep(1,4))
env.factors.analysis(nsp,splab,FE,Eopt,param)
Dmax <-rep(100,nsp); Gmax <- rep(1000,nsp)
param.H <- list(c(20, -0.02,0.6),c(20, -0.02,0.6))
param.l <- list(c(0.16,0.8,2),c(0.16,0.8,2))
D0 <- rep(5,nsp); t <- seq(0,50); nt <- length(t)
param.E<- list(c(3,2,1.5,1.1), rep(1,4))
Ef <- list(runif,runif,runif,runif)
param.Ef <- list(c(Eopt[1],Eopt[1]),c(0,Eopt[2]),c(Eopt[3],Eopt[3]),c(0,Eopt[4]))
t.GD <- ge.growth(nsp,splab,FE,Eopt,param.E,Ef,param.Ef,Dmax,Gmax,param.H,param.l,D0,nt)
# calibration Licania densiflora
dD <- c(0.5,0.6,0.7,0.9,0.8,1.0,1.1,1.3,1.2,1.0,1.0,0.8,0.8)
D <- seq(15,75,5)
Dmax <-100
param.H <- c(40, -0.015,0.6); param.l <- c(0.16,0.6,2.2)
dD.dt.calibra(D,dD,Dmax,param.H,param.l)
# light factor
clab <- c("Very Int","Int","Med","Tol","Very Tol")
c1<- c(1.58,1.26,1.13,1.05,1.02)
c2<- c(1.19,1.79,2.44,3.29,4.16)
c3<- c(0.15,0.12,0.09,0.06,0.03)
L <- seq(0,1,0.01); nl <- length(L)
ALF <- matrix(ncol=5,nrow=nl)
for(i in 1:5)ALF[,i] <- expon.alf(L, c(c1[i],c2[i],c3[i]))
# soil moisture factor
Elab <- c("F(1-E_WD)","F(1-E_DD)")
x <- seq(0,1,0.01)
E <- matrix(nrow=length(x),ncol=3)
y <- matrix(nrow=length(x),ncol=4)
for(i in 1:2) E[,i] <- x
p <- c(0.2,0.30)
for(i in 1:length(x))
y[i,] <- gauss.smf(E[i,],p)
Run the code above in your browser using DataLab